package com.tencent.wxpay.service;

import com.tencent.wxpay.common.Configure;
import com.tencent.wxpay.protocol.request.RefundReqData;

/**
 * 申请退款接口
 */
public class RefundService extends BaseService {

    /**
     * 申请退款接口构造方法，设置接口url
     * @throws IllegalAccessException
     * @throws InstantiationException
     * @throws ClassNotFoundException
     */
    public RefundService() throws IllegalAccessException, InstantiationException, ClassNotFoundException {
        super(Configure.REFUND_API);
    }

    /**
     * 请求申请退款接口
     * @param refundReqData 这个数据对象里面包含了API要求提交的各种数据字段
     * @return API返回的XML数据
     * @throws Exception
     */
    public String request(RefundReqData refundReqData) throws Exception {
        return sendPost(refundReqData);
    }
}
